package com.pyue.eam.regi.mapper;

import com.pyue.eam.common.data.datascope.EamBaseMapper;
import com.pyue.eam.regi.bo.CqRegiUserEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Collection;
import java.util.List;

@Mapper
public interface CqRegiUserMapper extends EamBaseMapper<CqRegiUserEntity> {

    List<CqRegiUserEntity> getRegiLibListByUserId(@Param("userId") Long userId);

    List<Long> getRegiIdListByUserId(@Param("userId") Long userId);

    // 人主动加入团
    void batchRegiToUser(@Param("userId") Long userId, @Param("dealRegiIdList") Collection<Long> dealRegiIdList);

    // 人被动加入团
    void batchUserToRegi(@Param("regiId") Long regiId, @Param("dealUserIdList") Collection<Long> dealUserIdList);

    List<Long> getUserIdListByRegiId(@Param("regiId") Long regiId);
}
